package LanQiao;

import java.util.Scanner;

public class _092 {
    /*
    递归实现指数型枚举
     */
    public static int n;
    public static int N =20;
    public static boolean[] arr;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        arr = new boolean[N];
        dfs(1);
    }
    private static void dfs(int u){
        if (u>n){
            for (int i=1;i<=n;i++){
                if (arr[i]) {
                    System.out.print(i + " ");
                }
            }
            System.out.println();
            return;
        }
        arr[u] = true;
        dfs(u+1);
        arr[u]= false;
        dfs(u+1);
    }
}
